<% 'Extract ProfileID from Querystring strSuppliedQID = left(stripHTML2(RemoveCharacters(trim(request.querystring("QID")))),10) If Session("GivCustomerID") = "" Or Session("UserID") = "" Then 'not logged in strBouncebackURL = "/asp/homepage.asp?error=NotLoggedIn&referral=www.online-supervision.net/asp/Query.asp?QID=" & strSuppliedQID response.redirect strBouncebackURL End If If strSuppliedQID = "" Then response.redirect "http://www.online-supervision.net/asp/Statistics.asp" End If %> www.online-supervision.net
<% If Session("UserID") = "" Then %>click here to login to the secure area of the site<% Else response.write "" End If %> homepage
<% If Session("UserID") = "" Then %> register to provide or receive online clinical supervision<% Else response.write "" End If %> online-supervision.net bulletin boards online supervision research resources & links contact


<% Set conn = Server.CreateObject("ADODB.Connection") conn.Open connstr strSQL = "SELECT Queries.QueryID, Queries.QueryName, Queries.QueryContent, QueryFields.FieldID, QueryFields.FieldName FROM QueryFields INNER JOIN Queries ON QueryFields.QueryID = Queries.QueryID WHERE Queries.QueryID = '" & strSuppliedQID & "'" If Session("UserStatus") <> "researching" OR Session("Authorised") <> "yes" Then strSQL = strSQL & " AND Queries.QuerySecurity = '0'" End If Set rs = conn.Execute(strSQL) If Not rs.eof Then strQueryID = rs.fields("QueryID") strQueryName = rs.fields("QueryName") strQueryContent = rs.fields("QueryContent") strFieldID = rs.fields("FieldID") strFieldName = rs.fields("FieldName") strSQL = "SELECT Count(QueryFields.FieldID) AS NumberofFields FROM QueryFields INNER JOIN Queries ON QueryFields.QueryID = Queries.QueryID WHERE Queries.QueryID = '" & strSuppliedQID & "'" Set rs2 = conn.Execute(strSQL) intNumberOfFields = rs2.fields("NumberofFields") %> Here are the results of the "<%=strQueryName%>" query:

<% Do While Not rs.eof %> <% rs.movenext loop Set rs1 = conn.Execute(strQueryContent) intRecordCount = 1 DO While Not rs1.eof %> <% intRecordCounter = 0 Do While intRecordCounter < intNumberOfFields %> <% intRecordCounter = intRecordCounter + 1 loop rs1.movenext intRecordCount = intRecordCount + 1 loop rs.close SET rs = nothing rs1.close SET rs1 = nothing %>
<%=strQueryName%>
Record no.
<%=rs.fields("FieldName")%>
<%=intRecordCount%>
 <%=rs1(intRecordCounter)%>

Click here to return to the statistics page.

<% Else %> Sorry - either there is no query found corresponding to the URL you used, or you do not have the security clearance to access it. Click here to return to the statistics page. <% End If %>

 

 

 

 

 


Copyright 2002-4, GroupInterVisual Ltd. All rights reserved.